{% extends 'base.html' %}
{% load i18n staticfiles tz stats %}
{% block title %}{% trans 'Profile' %} / {{ block.super }}{% endblock title %}

{% block nav_tabs %}
    {% include 'inline/profile_tabs.html' %}
{% endblock nav_tabs %}

{% block content %}
    <section id="content">
        <div class="wrapper" style="font-size: 14px;">
            <div class="content_head">
                <div class="content_title">
                    {% trans 'Profile' %}
                </div>
            </div>
            <form class="form" action="" method="post" onsubmit="this.submit.disabled=true;">
                {% if form.non_field_errors %}
                    <div class="non_field_errors">
                        {% for error in form.non_field_errors %}
                            <div class="error">{{ error }}</div>
                        {% endfor %}
                    </div>
                {% endif %}
                {% csrf_token %}
                <input type="hidden" name="next" value="{{ next }}"/>
                {% for field in form %}
                    <div class="form_field {{ field|widget_type }}">
                        <label for="{{ field.id_for_label }}">{{ field.label }}</label>
                        {% if field.help_text %}
                            <div class="help_text">{{ field.help_text }}</div>
                        {% endif %}
                        <div class="field_wrapper">{{ field }}</div>
                        {% if field.errors %}
                            {% for error in field.errors %}
                                <div class="error">{{ error }}</div>
                            {% endfor %}
                        {% endif %}
                    </div>
                {% endfor %}
                <div class="buttons">
                    <button type="submit" class="green">{% trans 'Save' %}</button>
                </div>
            </form>
        </div>
    </section>
{% endblock content %}

{% block bottom %}
    {{ block.super }}
    <script src="{% static 'js/form.js' %}"></script>
{% endblock bottom %}
